<!--
  ~ Copyright 2011 Research Studios Austria Forschungsgesellschaft mBH
  ~
  ~ This file is part of easyrec.
  ~
  ~ easyrec is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ easyrec is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with easyrec.  If not, see <http://www.gnu.org/licenses/>.
  -->

<input id="host" style="width:100%" value="http://localhost:8080/api/1.0/profile/"><br>
servletname
<select id="servletname" style="width:100%;">
    <option>store</option>
    <option>delete</option>
    <option>load</option>
    <option>field/store</option>
    <option>field/delete</option>
    <option>field/load</option>
</select>

<hr/>
apikey<input id="apikey" style="width:100%"><br>
tenantid<input id="tenantid" style="width:100%"><br>
<hr/>
itemid<input id="itemid" style="width:100%"><br>
itemtype<input id="itemtype" style="width:100%"><br>
<hr/>
profile<input id="profile" style="width:100%" /><br>
field<input id="field" style="width:100%" /><br>
value<input id="value" style="width:100%" /><br>
<a href="javascript:send();">SEND ACTION</a>

<script>
    var url = "";
    function send() {
        url = document.getElementById("host").value +
                document.getElementById("servletname").value + "?";

        url += "apikey=" + document.getElementById("apikey").value + "&" +
                "tenantid=" + document.getElementById("tenantid").value + "&";


        addValue("itemid");
        addValue("itemtype");
        addValue("profile");
        addValue("field");
        addValue("value");

        document.getElementById("iframe").src = url;
        document.getElementById("debug").innerHTML = url;
    }

    function addValue(name) {
        if (document.getElementById(name).value != "") {
            url += name + "=" + document.getElementById(name).value + "&";
        }
    }
</script>

<div id="debug" style="background:#eee;">URL FIELD</div>
<iframe id="iframe" src="../../../../../../../../Dokumente%20und%20Einstellungen/dmann/Desktop"
        style="width:100%;height:600px;"></iframe>
